import React from 'react'
import {
    HashRouter,//路由管理者
    Switch,
    Route   //切换不同路哟有对象
} from 'react-router-dom'


import Index from '../components/index'
import Login from '../components/Login'

class Router extends React.Component{
    constructor(props){
        super(props)
    }
    render(){
        return(
            <div>
                <HashRouter>
                    <Switch>
                        <Route path='/login' component={Login}></Route>
                        <Route path='/' component={Index} />
                    </Switch>
                </HashRouter>
            </div>
        )
    }
}

export default Router;